package cn.bx.spring.demo;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {
    public static void main(String[] args) {
        ApplicationContext ac=new ClassPathXmlApplicationContext("app*.xml");
        Person1 p1=(Person1)ac.getBean("person1");
        p1.say();

        Person2 p2=(Person2)ac.getBean("person2");
        p2.say();
    }
}
